import request from '@/utils/request_zc'

export function getPurchaseRequestList ({
  page,
  limit,
  requestNo,
  requestType,
  planNo,
  applyUser,
  applyStartTime,
  applyEndTime,
  applyStatus,
  approveUser,
  approveStartTime,
  approveEndTime,
  approveStatus
}) {
  return request({
    url: '/purchase/request/list',
    method: 'get',
    params: {
      limit,
      page,
      planNo,
      requestNo,
      requestType,
      applyUser,
      applyStartTime,
      applyEndTime,
      applyStatus,
      approveUser,
      approveStartTime,
      approveEndTime,
      approveStatus
    }
  })
}


export function PurchaseRequestApprove ({ approveStatus, id, approveAdvice }) {
  return request({
    url: '/purchase/request/approve',
    method: 'post',
    data: {
      approveStatus,
      id,
      approveAdvice
    }
  })
}
